package com.winchain.chainbill.esign.service.impl;

import com.shell.bee.base.utils.StringUtil;
import com.shell.framework.utils.SysDateUtil;
import com.winchain.chainbill.basic.cus.po.CusGrp;
import com.winchain.chainbill.basic.cus.service.CusGrpService;
import com.winchain.chainbill.esign.service.ContBasSnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ContBasSnServiceImpl implements ContBasSnService {
	@Autowired
	private CusGrpService cusGrpService;

	public String createContSn(String grpId) {
		String grpCode = "";
		if (!StringUtil.emptyAndNull(grpId)) {
			grpCode = ((CusGrp) this.cusGrpService.selectByKey(grpId)).getGrpCode();
		}
		return grpCode + SysDateUtil.getSystemDateTime("yyyyMMddHHmmss");
	}
}
